/**
 * 
 */
package com.letv.ads.view;

import android.os.Bundle;

import com.letv.adlib.sdk.types.AdElementMime;

/**
 * Created by chengjian 下午7:48:36 抽象出广告view的相同的行为
 */
public interface IAdView {
    /**
     * 广告播放状态
     */
    int PLAY_STATE_ERROR = -1;

    int PLAY_STATE_DILE = 0;

    int PLAY_STATE_STARTED = 1;

    int PLAY_STATE_COMPLETE = 2;

    String KEY_STATE = "state";

    /**
     * 广告点击
     *
     */
    interface AdViewOnclickListenr {

        void onADClick(AdElementMime adElementMime);
    }

    /**
     * 素材加载回调
     */
    interface AdMaterialLoadListener {

        boolean onLoadComplete();

        void onLoadFailed();
    }

    /**
     * 广告播放过程中的
     */
    interface AdPlayStateListener {
        /**
         * bundle里面包含state和附加数据
         * 
         * state使用KEY_STATE获取
         * 
         * @param bundle
         */
        void onADPlayStateChange(Bundle bundle);
    }

    void showAD(AdElementMime adInfo);

    void closeAD();

    void setAdOnClickListener(AdViewOnclickListenr adViewOnclickListenr);

    void setAdMaterialLoadListener(AdMaterialLoadListener adMaterialLoadListener);

    void setAdPlayStateListener(AdPlayStateListener adPlayStateListener);

}
